<%-- 
    Document   : editUserInfo
    Created on : Jun 15, 2012, 9:58:39 AM
    Author     : Owner
--%>

<%@include file="/jsp/adminTop.jsp"%>
<html>
    <head>
        <title>Edit User Info</title>
    </head>
    <body>
        <div class="clear"></div>
        <table align="center" border="1" cellspacing="10px" width="100%">
            <tr>
                <td style="vertical-align: top;" width="20%">
                    <%@include file="/jsp/right.jsp" %>
                </td>
                <td>                &nbsp;            </td>
                <td style="vertical-align: top;" width="80%">
                    <div class="page-title"><h1>Manage Customers</h1></div>
                    <table border="1" cellspacing="10px" align="center" width="100%">
                        <tr>
                            <td><h2>Edit Customer</h2></td>
                            <td colspan="2">[<a href="./userAccount.do?action=showManageUsers">List Customers</a>] </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <html:form action="/userAccount" method="post">
                                    <logic:present name="userInfo" scope="request">
                                        <table border="1" cellspacing="10px" align="center" width="100%">
                                            <tr>
                                                <td colspan="3">Customer Details</td>
                                            </tr>
                                            <tr>
                                                <td>Customer Name:</td>
                                                <td><bean:write name="userInfo" property="fullName"/></td>
                                                <td>Cust Id:<bean:write name="userInfo" property="userId"/> 
                                                    <html:hidden name="userInfo" property="userId"/></td>
                                            </tr>
                                            <tr>
                                                <td>Email:</td>
                                                <td><html:text name="userInfo" property="emailId"/></td>
                                                <td>Created On:<bean:write name="userInfo" property="accountCreatedOn"/></td>
                                            </tr>
                                            <tr>
                                                <td colspan="3"><html:errors property="errEmailId"/></td>
                                            </tr>
                                            <tr>
                                                <td>Date of Birth:</td>
                                                <td>Mobile No:</td>
                                                <td>Status:</td>
                                            </tr>
                                            <tr>
                                                <td><bean:write name="userInfo" property="dateOfBirth"/></td>
                                                <td><html:text name="userInfo" property="mobileNo"/></td>
                                                <td><html:select name="userInfo" property="accountStatusId">
                                                        <html:option value="0">--Select--</html:option>
                                                        <html:options collection="statusList" property="key" labelProperty="value"/>
                                                    </html:select>  </td>
                                            </tr>
                                            <tr>
                                                <td colspan="3"><html:errors property="errMobileNo"/>
                                                    <html:errors property="errStatusId"/></td>
                                            </tr>
                                        </table>
                                    </logic:present>

                                    <table cellspacing="5px" align="center" border="1" width="100%" >
                                        <tr>
                                            <td>
                                                <table>
                                                    <tr><td></td></tr>
                                                    <tr><td>Title:</td></tr>
                                                    <tr><td>First Name:</td></tr>
                                                    <tr><td>Middle Name:</td></tr>
                                                    <tr><td>Last Name:</td></tr>
                                                    <tr><td>Contact No:</td></tr>
                                                    <tr><td>Address:</td></tr>
                                                    <tr><td>Address2:</td></tr>
                                                    <tr><td>City:</td></tr>
                                                    <tr><td>Pin Code:</td></tr>
                                                    <tr><td>State:</td></tr>
                                                </table>
                                            </td>
                                            <td>
                                                <table>
                                                    <logic:present name="userInfo" scope="request">
                                                        <tr>                                                    
                                                            <td><strong>Billing Address</strong></td>
                                                        </tr>
                                                        <tr>                                                    
                                                            <td><html:select name="userAddressBill" property="addrTitleId">
                                                                    <html:option value="0">--- Select ---</html:option>
                                                                    <html:options collection="titleMap" property="key" labelProperty="value"/>
                                                                </html:select></td>
                                                        </tr>
                                                        <tr>                                                    
                                                            <td><html:text name="userAddressBill" property="addrFirstName"/></td>
                                                        </tr>
                                                        <tr>
                                                            <td><html:text name="userAddressBill" property="addrMiddleName"/></td>
                                                        </tr>
                                                        <tr>
                                                            <td><html:text name="userAddressBill" property="addrLastName"/></td>
                                                        </tr>
                                                        <tr>
                                                            <td><html:text name="userAddressBill" property="contact"/></td>
                                                        </tr>
                                                        <tr>
                                                            <td><html:text name="userAddressBill" property="house"/></td>
                                                        </tr>
                                                        <tr>
                                                            <td><html:text name="userAddressBill" property="street"/></td>
                                                        </tr>
                                                        <tr>
                                                            <td><html:text name="userAddressBill" property="city"/></td>
                                                        </tr>
                                                        <tr>
                                                            <td><html:text name="userAddressBill" property="pinCode"/></td>
                                                        </tr>
                                                        <tr>                                                            
                                                            <td><html:select name="userAddressBill" property="stateId" >
                                                                    <html:option value="0">--- Select ---</html:option>
                                                                    <html:options collection="stateMap" property="key" labelProperty="value"/>
                                                                </html:select></td>

                                                        </tr>
                                                    </logic:present>
                                                </table>
                                            </td>
                                            <td>
                                                <table>
                                                    <logic:present name="userAddressDel" scope="request">
                                                        <tr>
                                                            <td><strong>Delivery Address</strong></td>
                                                        </tr>
                                                        <tr>
                                                            <td><html:select name="userAddressDel" property="addrTitleId" >
                                                                    <html:option value="0">--- Select ---</html:option>
                                                                    <html:options collection="titleMap" property="key" labelProperty="value"/>
                                                                </html:select></td>
                                                        </tr>
                                                        <tr>
                                                            <td><html:text name="userAddressDel" property="addrFirstName"/></td>
                                                        </tr>
                                                        <tr>
                                                            <td><html:text name="userAddressDel" property="addrMiddleName"/></td>
                                                        </tr>
                                                        <tr>
                                                            <td><html:text name="userAddressDel" property="addrLastName"/></td>
                                                        </tr>
                                                        <tr>
                                                            <td><html:text name="userAddressDel" property="contact"/></td>
                                                        </tr>
                                                        <tr>
                                                            <td><html:text name="userAddressDel" property="house"/></td>
                                                        </tr>
                                                        <tr>
                                                            <td><html:text name="userAddressDel" property="street"/></td>
                                                        </tr>
                                                        <tr>
                                                            <td><html:text name="userAddressDel" property="city"/></td>
                                                        </tr>
                                                        <tr>
                                                            <td><html:text name="userAddressDel" property="pinCode"/></td>
                                                        </tr>
                                                        <tr>
                                                            <td><html:select name="userAddressDel" property="stateId">
                                                                    <html:option value="0">--- Select ---</html:option>
                                                                    <html:options collection="stateMap" property="key" labelProperty="value"/>
                                                                </html:select></td>
                                                        </tr>
                                                    </logic:present>
                                                </table>
                                            </td>
                                        </tr>
                                    </table>
                                </html:form>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="3">
                                <div id="errdividui" >
                                    <span id="errspanidui"></span>
                                    <html:errors property="errUserInfo"/>
                                </div>
                            </td>
                        </tr>
                        <tr>
                            <td colspan="2"><a onclick="javascript:return validateUserInfo('./userAccount.do?action=updateUserInfo','userBean')">
                                    <img src="images/update.png" onmouseout="src='images/update.png'" onmouseover="src='images/update-hover.png'" alt="Updatet" /></a></td>
                            <td><a onclick="javascript: deleteUserInfo('./userAccount.do?action=deleteUserInfo','userBean')">
                                    <img src="images/delete.png" onmouseout="src='images/delete.png'" onmouseover="src='images/delete-hover.png'" alt="Delete" /></a></td>
                        </tr>
                    </table>
                </td>
            </tr>
        </table>   
    </body>
</html>
